package com.fzz.learnitservice.service;

import com.fzz.learnitservice.pojo.po.ChatMemory;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.util.List;

public interface IAIService {
    String chat(String question);


    /**
     * 流式聊天并发送SSE事件
     * @param question 用户问题
     * @param emitter SSE发射器
     * @param userId 用户ID（用于异步线程中设置ThreadLocal）
     */
    void chatStreamWithSse(String question, SseEmitter emitter, Long userId);

    void clearChatHistory();

    List<ChatMemory> chatRecord();

    void edit(String question, SseEmitter emitter, Long userId, Long id);

    void delete(Long id);
}
